<template>
  <div
    v-if="crud.props.searchToggle"
  >
    <!-- <el-select
      v-model="query.houseType"
      clearable
      size="small"
      placeholder="请选择部门"
      class="filter-item"
      style="width: 150px"
    >
      <el-option
        v-for="item in houseTypeList"
        :key="item.key"
        :label="item.label"
        :value="item.key"
      />
    </el-select> -->
    <el-select
      v-model="query.demandType"
      clearable
      size="small"
      placeholder="请选择诉求类型"
      class="filter-item"
      style="width: 150px"
    >
      <el-option
        v-for="item in listType"
        :key="item.key"
        :label="item.label"
        :value="item.key"
      />
    </el-select>
    <el-input v-model="query.enterpriseName" clearable size="small" placeholder="请输入企业名称" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
     <el-input v-model="query.contact" clearable size="small" placeholder="请输入联系方式" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
    <el-select
      v-model="query.statusId"
      clearable
      size="small"
      placeholder="请选择处理状态"
      class="filter-item"
      style="width: 150px"
    >
      <el-option
        v-for="item in listStatus"
        :key="item.key"
        :label="item.label"
        :value="item.key"
      />
    </el-select>
    <rrOperation />
    <!-- <el-button class="filter-item" size="mini" type="primary" icon="el-icon-download" @click="exportData"  >导出</el-button> -->

  </div>
</template>

<script>
import { header } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'

export default {
  components: { rrOperation },
  mixins: [header()],
  props: {
    permission: {
      type: Object,
      required: true
    }
  },
  data() {
    return {
      listType: [
        { label: '全部', key: ''},
        { label: '要素保障', key: 1 },
        { label: '人力社保', key: 2 },
        { label: '安全生产', key: 3 },
        { label: '市场监督', key: 4 },
        { label: '政策咨询', key: 5 },
        { label: '融资贷款', key: 6 },
        { label: '市场销售', key: 7 },
        { label: '法律咨询', key: 8 },
        { label: '企业发展', key: 9 },
        { label: '其他', key: 10 },
    ],
    listStatus: [
        { label: '全部', key: ''},
        { label: '待分发', key: 1 },
        { label: '办理中', key: 2 },
        { label: '办理完成', key: 3 }
    ]
    }
  },
  created() {

  },
  methods: {
    exportData() {
      downloadTheFile(`/business/excel/exportHouse`, '厂房信息.xlsx', this.query)
    }
  }
}
</script>
